<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>嘎嘎切换背景颜色</title>
    <style>
        input{
            -webkit-appearance:none;
            width: 60px;
            height: 60px;
        }
        input{
            background-color: blue;
        }
        .div{
        width: 250px;
        height: 250px;
        border: solid;
        background-color: red;
        font-size: 37px;
        }
        input:checked{
            border-radius:20px;
        }
        input:checked ~div{
            background-color: blue;
        }

        .lan:checked ~div{
            background-color: yellow;
        }

        .red:checked ~div{
            background-color: red;
        }

        .lse:checked ~div{
            background-color: seagreen;
        }

        .zise:checked ~div{
            background-color: violet;
        }

        .fense:checked ~div{
            background-color: pink;
        }

        .lan{
            background-color: yellow;
        }
        .red{
            background-color: red;
        }
        .lse{
            background-color: seagreen;
        }
        .zise{
            background-color: violet;
        }
        .fense{
            background-color: pink;
        }
    </style>
</head>
<body>
  <input type="radio" name="btn" class="lan">
  <input type="radio" name="btn" class="red">
  <input type="radio" name="btn" class="lse">
  <input type="radio" name="btn" class="zise">
  <input type="radio" name="btn" class="fense">
  <div class="div">嘎嘎变颜色</div>
</body>
</html>